import request from '@/utils/request'

// 获取企业管理列表
export const getCompanysListApi = (params) => request({
    url:'/companys',
    params
})

// 新增
export const addCompanyApi = (data) => request({
    url:'/companys',
    method:'post',
    data
})

//编辑
export const editCompanyApi = (id) => request({
    url:`/companys/${id}?${id}`
})

export const editSuccessApi = (data) => request ({
    url:'/companys/' + data.id,
    method:'put',
    data
})

// 状态改变
export const changeStateApi = ({id,state}) => request({
    url:`/companys/${id}/${state}`,
    method:'post'
})

// 删除 
export const deleteApi = (id) => request({
    url:`/companys/${id}`,
    method:'delete'
})